package cn.neo.support.smartadapters.adapters;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import cn.neo.support.smartadapters.views.BindableSimpleDraweeView;

/**
 * <b>Name:</b>图片的视图绑定<br>
 * <b>Author:</b> WK（wangkun@xjzhicheng.com)<br>
 * <b>Date:</b> 2017-01-11<br>
 * <b>Describe:</b> PLEASE TO FIXME...<br>
 * <b>Version:</b>V1.0<br>
 * <b>Revision History:</b><br>
 */
public abstract class BaseAdapterItemView4SDV<T> extends BindableSimpleDraweeView<T> {
    public BaseAdapterItemView4SDV(Context context) {
        super(context);
    }

    public BaseAdapterItemView4SDV(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public BaseAdapterItemView4SDV(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public void notifyItemAction(int actionId, T theItem, View view) {
        if (this.viewEventListener != null) {
            this.viewEventListener.onViewEvent(actionId, theItem, this.position, view);
        }

    }

    public void notifyItemAction(int actionId, View view) {
        this.notifyItemAction(actionId, this.item, view);
    }

    public void notifyItemAction(int actionId) {
        this.notifyItemAction(actionId, this.item, this);
    }
}
